package com.twu.biblioteca;

public class User {

    private final String libraryNumber;
    private final String password;
    private final String name;
    private final String email;
    private final String phone;

    public User(String libraryNumber, String password, String name, String email, String phone) {
        this.libraryNumber = libraryNumber;
        this.password = password;
        this.name = name;
        this.email = email;
        this.phone = phone;
    }

    public String getLibraryNumber() {
        return libraryNumber;
    }
    public String contactInfo() {
        return String.format("%s\n%s\n%s\n", name, email, phone);
    }

    public boolean authenticate(String password) {
        return this.password.equals(password);
    }
}
